<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Hello Vue</title>
  <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
<div id="app">
  <h1>{{msg}}</h1>
  <button @click="handleChange">点击我</button>
</div>
</body>
<script>
  new Vue({
    el: '#app',
    data(){
      return {
        msg: '你好 Vue!'
      };
    },
    created () {
      console.log('created')
    },
    mounted () {
      console.log('mounted')
    },
    methods: {
      handleChange () {
        this.msg = '你好！'
      }
    },
  })
</script>
</html>
